best method to find missing number in an array